using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace SpaceEventManager
{
    public class Space
    {
        string name, notes;
        Point dimensions;
        Dictionary<Space, Point> innerSpaces;

        public Space(string iName, string iNotes, Point iDimen, Dictionary<Space, Point> iInSpaces)
        {
            name = iName;
            notes = iNotes;
            dimensions = iDimen;
            innerSpaces = iInSpaces;
        }

        #region Getters and Setters

        public string Name
        { get { return name; } set { name = value; } }

        public string Notes
        { get { return notes; } set { notes = value; } }

        public Point Dimensions
        { get { return dimensions; } set { dimensions = value; } }

        public Dictionary<Space, Point> InnerSpaces
        { get { return innerSpaces; } set { innerSpaces = value; } }

        #endregion

        /*
         * Adds an innerSpace to this space's innerSpaces dictionary.*/
        public void AddSpace(Space inSpace, Point iLocation)
        {
            if (!(innerSpaces.ContainsKey(inSpace)))
            {
                innerSpaces.Add(inSpace, iLocation);
            }
        }

        /*
         * removes an innerSpace from this space's innerSpaces dictionary.*/
        public void RemoveSpace(Space inSpace)
        {
            if (innerSpaces.ContainsKey(inSpace))
            {
                innerSpaces.Remove(inSpace);
            }
        }
    }
}
